package com.cyj.dream.swagger.config;

import org.springframework.web.reactive.config.ResourceHandlerRegistry;
import org.springframework.web.reactive.config.WebFluxConfigurer;

/**
 * @Description: webflux 网关 swagger 资源路径配置
 * @BelongsProject: DreamChardonnay
 * @BelongsPackage: com.cyj.dream.swagger.config
 * @Author: ChenYongJia
 * @CreateTime: 2021-10-11 14:02
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
public class WebFluxSwaggerConfiguration implements WebFluxConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/swagger-ui/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
                .resourceChain(false);
    }

}
